<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>index</title>
</head>
<body>

<h1>this is in index</h1>

</body>
<script type="text/javascript" src="socket.js"></script>
<!-- sendExample -->
<!-- step 1 : open it : MyPush.open(); -->
<!-- step 2 : MyPush.register(build_duri("test001", "D")); -->
<!-- step 3 : send Msg :  MyPush.send("Dtest001","userid00001","this is msg", "TRANS","MSG"); -->
<script>
    function build_duri(groupid, type) {
        var _duri = new PushRegItem(type + groupid, "userid00001", "MSG", function (e) {
            console.log("trigger du" + e);
        });
        return _duri;
    }

    // MyPush.open();
    MyPush.register(build_duri("test001", "D"));

</script>

</html>
